import request from '@/utils/request'

export function getAllMaintainerInfo(pageNum) {
  return request({
    url: '/maintainer/list',
    method: 'GET',
    params: { pageNum }
  })
}

export function getMaintainerInfo(uname) {
  return request({
    url: '/maintainer/select',
    method: 'GET',
    params: { uname }
  })
}

export function getMaintainerInfo2(jobNumber) {
  return request({
    url: '/maintainer/selectNum',
    method: 'GET',
    params: { jobNumber }
  })
}
export function editMaintainer(data) {
  return request({
    url: '/maintainer/edit',
    method: 'POST',
    data
  })
}

export function saveMaintainer(data) {
  return request({
    url: '/maintainer/save',
    method: 'POST',
    data
  })
}

export function delMaintainer(jobNumber) {
  return request({
    url: '/maintainer/del',
    method: 'POST',
    params: { jobNumber }
  })
}

export function editMaintainer2(data) {
  return request({
    url: '/maintainer/update',
    method: 'POST',
    data
  })
}
